<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
if($_RQ['op']=='get'){
	$setting=uni_setting('member_setting');
	$setting['sign']=$setting['sign']?$setting['sign']:array('open'=>0);
	$return['item']=$setting['sign'];
	$return['show']='member';
	$return['htmls']=array(
		'type'=>'edit',
		'post'=>'post',
		'edit_tab'=>true,
		'desc'=>'参数设置',
    	'edits'=>array(
			array(
    			'title'=>'签到设置',
    			'list'=>array(
					array('type'=>'switch','title'=>'是否开启签到','name'=>'open'),
					array('type'=>'radio','title'=>'设置奖励类型','name'=>'credit_type','options'=>'credit_type'),
					array('type'=>'string','title'=>'签到奖励额度','name'=>'credit'),
					array('type'=>'text','title'=>'签到规则','name'=>'content'),
					array('type'=>'switch','title'=>'是否积分生额','name'=>'open_getfee','help'=>'开启后，每天积分会按比率产生余额！'),
					array('type'=>'switch','title'=>'是否关闭周六周日兑换','name'=>'open_week67','isradio'=>1,'help'=>'关闭后，周六周日不会自动兑换余额'),
					array('type'=>'unitstring','unit'=>'%','title'=>'积分生额比率','name'=>'getfee_rate','help'=>'需添加计划任务：1、计划任务：系统--云服务--计划任务;任务URL：jy_sign/plan/;任务执行间隔:1天；下一次任务执行时间：凌晨'),
    			)
			),
			array(
    			'title'=>'视频广告设置',
    			'list'=>array(
					array('type'=>'switch','title'=>'是否开启视频广告？','name'=>'isvideo'),
					array('type'=>'video','title'=>'视频广告','name'=>'sign_video'),
    			)
			),
		)
	);
	$return['credit_type']=$this->credit_type;
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();
	$setting=uni_setting('member_setting');
	$setting['sign']=$postdata;
	uni_setting('member_setting',$setting);
	exi('设置成功！');
}
?>